/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wargame.entity;

import module.GlobalConstant;
import module.Utility_Function;

/**
 *
 * @author stanley.2007
 */
public class Project {

    private int project_id;
    private int man_hours_dot_net;
    private int man_hours_c_sharp;
    private int man_hours_jsp;
    private int man_hours_php;
    private int man_hours_ruby;
    private int man_hours_mysql;
    private int man_hours_mssql;
    private int man_hours_oracle;
    private int max_bid;
    private String max_bid_string;
    private int listing_turn_remaining;
    private int due_turn;
    private int offered_by;
    private int taken_by;
    private int bidded_price;
    private String bidded_price_string;
    private int submitted;
    private int track_record_point;
    private Company company;
    private boolean submitable;
    private ProjectInject inject;

    public ProjectInject getInject() {
        return inject;
    }

    public void setInject(ProjectInject inject) {
        this.inject = inject;
    }

    public boolean isSubmitable() {
        return submitable;
    }

    public void setSubmitable(boolean submitable) {
        this.submitable = submitable;
    }

    public int getManhourBySkill(int index) {
        switch (index) {
            case GlobalConstant.DOT_NET:
                return man_hours_dot_net;
            case GlobalConstant.C_SHARP:
                return man_hours_c_sharp;
            case GlobalConstant.JSP:
                return man_hours_jsp;
            case GlobalConstant.PHP:
                return man_hours_php;
            case GlobalConstant.RUBY:
                return man_hours_ruby;
            case GlobalConstant.MYSQL:
                return man_hours_mysql;
            case GlobalConstant.MSSQL:
                return man_hours_mssql;
            case GlobalConstant.ORACLE:
                return man_hours_oracle;
            default:
                return 0;
        }
    }

    public void setManhourBySkill(int index, Integer value) {
        value = (value == null)? 0 : value;
        switch (index) {
            case GlobalConstant.DOT_NET:
                this.man_hours_dot_net = value;
                break;
            case GlobalConstant.C_SHARP:
                this.man_hours_c_sharp = value;
                break;
            case GlobalConstant.JSP:
                this.man_hours_jsp = value;
                break;
            case GlobalConstant.PHP:
                this.man_hours_php = value;
                break;
            case GlobalConstant.RUBY:
                this.man_hours_ruby = value;
                break;
            case GlobalConstant.MYSQL:
                this.man_hours_mysql = value;
                break;
            case GlobalConstant.MSSQL:
                this.man_hours_mssql = value;
                break;
            case GlobalConstant.ORACLE:
                this.man_hours_oracle = value;
                break;
        }
    }

    public void addManhourBySkill(int index, Integer value) {
        value = (value == null)? 0 : value;
        switch (index) {
            case GlobalConstant.DOT_NET:
                this.man_hours_dot_net += value;
                break;
            case GlobalConstant.C_SHARP:
                this.man_hours_c_sharp += value;
                break;
            case GlobalConstant.JSP:
                this.man_hours_jsp += value;
                break;
            case GlobalConstant.PHP:
                this.man_hours_php += value;
                break;
            case GlobalConstant.RUBY:
                this.man_hours_ruby += value;
                break;
            case GlobalConstant.MYSQL:
                this.man_hours_mysql += value;
                break;
            case GlobalConstant.MSSQL:
                this.man_hours_mssql += value;
                break;
            case GlobalConstant.ORACLE:
                this.man_hours_oracle += value;
                break;
        }
    }

    public String getManhourSkillName(int index) {
        switch (index) {
            case GlobalConstant.DOT_NET:
                return ".Net";
            case GlobalConstant.C_SHARP:
                return "C#";
            case GlobalConstant.JSP:
                return "JSP";
            case GlobalConstant.PHP:
                return "PHP";
            case GlobalConstant.RUBY:
                return "RUBY";
            case GlobalConstant.MYSQL:
                return "MySQL";
            case GlobalConstant.MSSQL:
                return "MsSQL";
            case GlobalConstant.ORACLE:
                return "Oracle";
            default:
                return null;
        }
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public String getBidded_price_string() {
        return Utility_Function.formatCurrency(bidded_price);
    }

    public void setBidded_price_string(String bidded_price_string) {
        this.bidded_price_string = bidded_price_string;
    }

    public String getMax_bid_string() {
        return Utility_Function.formatCurrency(max_bid);
    }

    public void setMax_bid_string(String max_bid_string) {
        this.max_bid_string = max_bid_string;
    }

    public int getBidded_price() {
        return bidded_price;
    }

    public void setBidded_price(int bidded_price) {
        this.bidded_price = bidded_price;
    }

    public int getDue_turn() {
        return due_turn;
    }

    public void setDue_turn(int due_turn) {
        this.due_turn = due_turn;
    }

    public int getListing_turn_remaining() {
        return listing_turn_remaining;
    }

    public void setListing_turn_remaining(int listing_turn_remaining) {
        this.listing_turn_remaining = listing_turn_remaining;
    }

    public int getMan_hours_c_sharp() {
        return man_hours_c_sharp;
    }

    public void setMan_hours_c_sharp(int man_hours_c_sharp) {
        this.man_hours_c_sharp = man_hours_c_sharp;
    }

    public int getMan_hours_dot_net() {
        return man_hours_dot_net;
    }

    public void setMan_hours_dot_net(int man_hours_dot_net) {
        this.man_hours_dot_net = man_hours_dot_net;
    }

    public int getMan_hours_jsp() {
        return man_hours_jsp;
    }

    public void setMan_hours_jsp(int man_hours_jsp) {
        this.man_hours_jsp = man_hours_jsp;
    }

    public int getMan_hours_mssql() {
        return man_hours_mssql;
    }

    public void setMan_hours_mssql(int man_hours_mssql) {
        this.man_hours_mssql = man_hours_mssql;
    }

    public int getMan_hours_mysql() {
        return man_hours_mysql;
    }

    public void setMan_hours_mysql(int man_hours_mysql) {
        this.man_hours_mysql = man_hours_mysql;
    }

    public int getMan_hours_oracle() {
        return man_hours_oracle;
    }

    public void setMan_hours_oracle(int man_hours_oracle) {
        this.man_hours_oracle = man_hours_oracle;
    }

    public int getMan_hours_php() {
        return man_hours_php;
    }

    public void setMan_hours_php(int man_hours_php) {
        this.man_hours_php = man_hours_php;
    }

    public int getMan_hours_ruby() {
        return man_hours_ruby;
    }

    public void setMan_hours_ruby(int man_hours_ruby) {
        this.man_hours_ruby = man_hours_ruby;
    }

    public int getMax_bid() {
        return max_bid;
    }

    public void setMax_bid(int max_bid) {
        this.max_bid = max_bid;
    }

    public int getOffered_by() {
        return offered_by;
    }

    public void setOffered_by(int offered_by) {
        this.offered_by = offered_by;
    }

    public int getProject_id() {
        return project_id;
    }

    public void setProject_id(int project_id) {
        this.project_id = project_id;
    }

    public int getSubmitted() {
        return submitted;
    }

    public void setSubmitted(int submitted) {
        this.submitted = submitted;
    }

    public int getTaken_by() {
        return taken_by;
    }

    public void setTaken_by(int taken_by) {
        this.taken_by = taken_by;
    }

    public int getTrack_record_point() {
        return track_record_point;
    }

    public void setTrack_record_point(int track_record_point) {
        this.track_record_point = track_record_point;
    }
}
